check if character is a integer in pythin